<template>
  <z-anchor :target-offset="targetOffset">
    <z-anchor-link href="#components-anchor-demo-basic" title="Basic demo" />
    <z-anchor-link href="#components-anchor-demo-static" title="Static demo" />
    <z-anchor-link href="#API" title="API">
      <z-anchor-link href="#Anchor-Props" title="Anchor Props" />
      <z-anchor-link href="#Link-Props" title="Link Props" />
    </z-anchor-link>
  </z-anchor>
</template>
<script>
import { defineComponent, onMounted, ref } from 'vue'

export default defineComponent({
  setup() {
    const targetOffset = ref(undefined)
    onMounted(() => {
      targetOffset.value = window.innerHeight / 2
    })
    return {
      targetOffset
    }
  }
})
</script>
